package sicau.car.controller;

import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import sicau.car.result.R;

import java.sql.Timestamp;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * @Author ITcz
 * @Data 2020-10-12 - 22:46
 * 蓝卡云云api对接接口
 */
@RestController
@RequestMapping("/blueCard")
@CrossOrigin
public class BlueCardController {

    @RequestMapping("/heartbeat")
    @ApiOperation("心跳接口")
    public HashMap heartbeat(@RequestParam("parkNumber") String parkNumber,
                             @RequestParam("parkName") String parkName,
                             @RequestParam("spaceCount") int spaceCount,
                             @RequestParam("freeSpaceCount") int freeSpaceCount,
                             @RequestParam("bookSpaceCount") int bookSpaceCount,
                             @RequestParam("bookInParkCount") int bookInParkCount,
                             @RequestParam(name = "areaList",required = false) List areaList){
        HashMap map = new HashMap();
        map.put("status", "success");
        HashMap datasMap = new HashMap();
        Timestamp ts=new Timestamp(System.currentTimeMillis());
        datasMap.put("timeStamp", ts);
        map.put("datas", datasMap);
        return map;
    }


}
